package app.simple.com.oath.micro.server;

import java.io.InputStream;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;

import com.oath.micro.server.auto.discovery.Rest;

@Rest
@Path("/status")
public class SimpleStatusResource  {

	
	
	@GET
	@Produces("text/plain")
	@Path("/ping")
	public String ping() {
		
		return "ok";
	}

	   @POST
	    @Consumes(MediaType.MULTIPART_FORM_DATA)
	    @Produces(MediaType.TEXT_PLAIN)
	    @Path("/file")
	    public String create(@FormDataParam("file") InputStream fileInputStream,
	                         @FormDataParam("file") FormDataContentDisposition contentDispositionHeader) {

	        return "done";
	    }
}